﻿using Abp.Domain.Entities.Auditing;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Akso.Entities
{
    /// <summary>
    /// 上课进度-课程子表
    /// </summary>
    [Table("Edu_CourseSchedules")]
    public class CourseScheduleEntity: FullAuditedEntity<Guid>
    {
        public const int MaxChapterLength = 20;
        public const int MaxContentLength = 100;
        /// <summary>
        /// 章节
        /// </summary>
        [Required]//字段必填
        [MaxLength(MaxChapterLength)]
        public virtual string Chapter { get; set; }
        /// <summary>
        /// 上课内容
        /// </summary>
        [MaxLength(MaxContentLength)]
        public virtual string Content { get; set; }

        public Guid CourseID { get; set; }
        /// <summary>
        /// 外键-对应课程表的ID
        /// </summary>
        [ForeignKey("CourseID")]
        public virtual CourseEntity Course { get; set; }
    }
}
